/*
 * 
 * v1.2 by tonydon
 */
package cn.txdnet.txcms.domain;

import cn.txdnet.txweb.annotation.validation.*;

/**
 *
 * @author txdnet
 */

public class Infobase  extends BaseEntity{
    private static final long serialVersionUID = -4533680570140121000L;

    private Long infoid;
    
    @Default(intVal=0)
    private Integer cid;

    @Default("-")
    private String ctp;

    @NotEmpty
    @Size(min=1,max=60)
    private String title;

    @Default("-")
    private String subtitle;

    @Default("-")
    @Size(min=1,max=200)
    private String summary;

    @Default("-")
    private String origin;

    @CurrTime
    private Long pubtime;

    @Default(longVal=0)
    private Long endtime;

    @Default("-")
    private String author;

    @Default("-")
    private String pic;

    @Default("-")
    @Size(min=1,max=500)
    private String gotourl;

    @Default("-")
    @Size(min=1,max=100)
    private String vodurl;

    @Default(byteVal=0)
    private Byte infotype;
    
    @Default(byteVal=0)
    private Byte channeltype;

    @Default(byteVal=0)
    private Byte pubstate;

    @Default(byteVal=0)
    private Byte iscmt;

    @Default(intVal=0)
    private Integer hitnum;

    @Default(intVal=0)
    private Integer applynum;

    @Default(intVal=0)
    private Integer weight;

    @Default("-")
    private String tcolor;

    @Default(byteVal=0)
    private Byte tflag;

    @Default("-")
    @ClearEnterBlank
    private String content;
    
    @Default
    private Long pid;

    public Infobase() {
    }

    public Infobase(Long infoid) {
        this.infoid = infoid;
    }

    public Long getInfoid() {
        return infoid;
    }

    public void setInfoid(Long infoid) {
        this.infoid = infoid;
    }

    public String getCtp() {
        return ctp;
    }

    public void setCtp(String ctp) {
        this.ctp = ctp;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getOrigin() {
        return origin;
    }

    public void setOrigin(String origin) {
        this.origin = origin;
    }

    public Long getPubtime() {
        return pubtime;
    }

    public void setPubtime(Long pubtime) {
        this.pubtime = pubtime;
    }

    public Long getEndtime() {
        return endtime;
    }

    public void setEndtime(Long endtime) {
        this.endtime = endtime;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getGotourl() {
        return gotourl;
    }

    public void setGotourl(String gotourl) {
        this.gotourl = gotourl;
    }

    public String getVodurl() {
        return vodurl;
    }

    public void setVodurl(String vodurl) {
        this.vodurl = vodurl;
    }

    public Byte getInfotype() {
        return infotype;
    }

    public void setInfotype(Byte infotype) {
        this.infotype = infotype;
    }

    public Byte getPubstate() {
        return pubstate;
    }

    public void setPubstate(Byte pubstate) {
        this.pubstate = pubstate;
    }

    public Byte getIscmt() {
        return iscmt;
    }

    public void setIscmt(Byte iscmt) {
        this.iscmt = iscmt;
    }

    public Integer getHitnum() {
        return hitnum;
    }

    public void setHitnum(Integer hitnum) {
        this.hitnum = hitnum;
    }

    public Integer getApplynum() {
        return applynum;
    }

    public void setApplynum(Integer applynum) {
        this.applynum = applynum;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public String getTcolor() {
        return tcolor;
    }

    public void setTcolor(String tcolor) {
        this.tcolor = tcolor;
    }

    public Byte getTflag() {
        return tflag;
    }

    public void setTflag(Byte tflag) {
        this.tflag = tflag;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (infoid != null ? infoid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Infobase)) {
            return false;
        }
        Infobase other = (Infobase) object;
        if ((this.infoid == null && other.infoid != null) || (this.infoid != null && !this.infoid.equals(other.infoid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cn.txdnet.txcms.domain.Infobase[ infoid=" + infoid + " ]";
    }

    /**
     * @return the cid
     */
    public Integer getCid() {
        return cid;
    }

    /**
     * @param cid the cid to set
     */
    public void setCid(Integer cid) {
        this.cid = cid;
    }

        /**
     * @return the channeltype
     */
    public Byte getChanneltype() {
        return channeltype;
    }

    /**
     * @param channeltype the channeltype to set
     */
    public void setChanneltype(Byte channeltype) {
        this.channeltype = channeltype;
    }

    /**
     * @return the pid
     */
    public Long getPid() {
        return pid;
    }

    /**
     * @param pid the pid to set
     */
    public void setPid(Long pid) {
        this.pid = pid;
    }
    
    @Override
    public boolean validate() {
       return Validator.validate(this);
    }


    
}
